import React from 'react';
import {increamentAction,increamentActionAsync} from './store/action/actionCounter'
import {connect} from 'react-redux';

function App(props){
  // const {count,actionIncrement} = props
  const {count,increamentAction,increamentActionAsync} = props
  return (
    <div>
      <p>count:{count}</p>
      <button onClick={increamentAction}>Sync+</button>
      <button onClick={increamentActionAsync}>Async+</button>
    </div>
  )
}

const mapState = state=>({count:state.reducerCounter.count})
const mapDispatch = {increamentAction,increamentActionAsync}


export default connect(mapState,mapDispatch)(App) 